@echo off
chcp 65001 >nul
echo 正在快速修复当前文件夹文件名乱码...

for /f "delims=" %%i in ('dir /b /a-d') do (
    powershell -Command "$gbk=[System.Text.Encoding]::GetEncoding('GBK'); $utf8=[System.Text.Encoding]::UTF8; $newName=$utf8.GetString($gbk.GetBytes('%%i')); if ($newName -ne '%%i') { Rename-Item -Path '%%i' -NewName $newName }"
)

echo 修复完成！
pause